Skip to content

Add prerender-koa middleware for Koa v2+#2

Open
Lasalot wants to merge 2 commits intomainfrom
add-prerender-koa
Open

Add prerender-koa middleware for Koa v2+#2
Lasalot wants to merge 2 commits intomainfrom
add-prerender-koa

Conversation

@Lasalot
Copy link
Copy Markdown
Collaborator

@Lasalot Lasalot commented Apr 17, 2026

Summary

  • Modern rewrite of the abandoned RisingStack/koa-prerender package
  • Updated from Koa v1 generator functions (function*, yield) to Koa v2+ async middleware (async (ctx, next))
  • Replaced deprecated request and thunkify-wrap packages with built-in fetch (Node 18+) — zero dependencies
  • Updated bot list with modern crawlers (GPTBot, ClaudeBot, Amazonbot, Perplexity, etc.)

Test plan

  • 5 smoke tests covering: browser passthrough, bot interception, static asset bypass, _escaped_fragment_, fetch error fallback
  • Run with npm test inside prerender-koa/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant